package myschool.myshchool15.homework;

import java.util.Scanner;

public class Redemption {
    public static void main(String[] args){
        Scanner input = new Scanner(System.in);
        System.out.println("请输入消费金额：");
        int number = input.nextInt();
        if(number >= 50){
            System.out.println("是否参加优惠换购活动：");
            System.out.println("1：满50元，加2元换购百事可乐饮料一瓶");
            System.out.println("2：满100元，加3元换购500ml可乐一瓶");
            System.out.println("3：满100元，加10元换购5公斤面粉");
            System.out.println("4：满200元，加10元可换购1个苏泊尔炒菜锅");
            System.out.println("5：满200元，加20元可换购欧莱雅爽肤水一瓶");
            System.out.println("0：不换购");
            System.out.println("请选择：");
            int number_1 = input.nextInt();
            switch(number_1){
                case 1:
                    if(number >= 50){
                    System.out.println("本次消费总金额："+(number+2));
                    System.out.println("成功换购：百事可乐饮料一瓶");
                    }
                    break;
                case 2:
                    if(number >=100){
                    System.out.println("本次消费总金额："+(number+3));
                    System.out.println("成功换购：500ml可乐一瓶");
                    }
                    break;
                case 3:
                    if(number >=100){
                    System.out.println("本次消费总金额："+(number+10));
                    System.out.println("成功换购：5公斤面粉");
                    }
                    break;
                case 4:
                    if(number >=200){
                    System.out.println("本次消费总金额："+(number+10));
                    System.out.println("成功换购：1个苏泊尔炒菜锅");
                    }
                    break;
                case 5:
                    if(number >=200){
                    System.out.println("本次消费总金额："+(number+20));
                    System.out.println("成功换购：欧莱雅爽肤水一瓶");
                    }
                    break;
                case 0:
                    System.out.println("本次消费总金额："+number);
                    System.out.println("不换购");
                    break;
                default:
                    System.out.println("请输入正确的戴安");
            }


        }
        else{
            System.out.println("对不起不能换购。");
            System.out.println("本次消费总金额："+number);
        }
    }
}
